/*
 * @Author: yuki
 * @Date: 2025-10-25 17:13:01
 * @LastEditTime: 2025-11-06 15:09:53
 * @Description: 文件的作用
 */
import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';

import { PrismaClient } from 'generated/prisma/client';

@Injectable()
export class PrismaService
  extends PrismaClient
  implements OnModuleInit, OnModuleDestroy
{
  async onModuleInit() {
    await this.$connect();
  }

  async onModuleDestroy() {
    await this.$disconnect();
  }
}
